import org.antlr.v4.runtime.CharStreams;
import org.antlr.v4.runtime.CommonTokenStream;
import 抽象语法树节点.抽象语法树;

public class Cymbol语言 {
    public static 抽象语法树 解析(String 源代码) {
        var input = CharStreams.fromString(源代码);
        var lexer = new CymbolLexer(input);// 词法分析器，将输入文本转换为词法符号
        var tokens = new CommonTokenStream(lexer);// 词法符号流
        var parser = new CymbolParser(tokens);// 语法分析器
        return new Cymbol语言访问器().visit(parser.compilationUnit());
    }
}
